var $PN = "/DemoWebJavaApp";
$ = function(name) {
	return document.getElementById(name);
};
$N = function(name) {
	return document.getElementsByName(name);
};
$TN=function(tag,attri,value){
	var ls=document.getElementsByTagName(tag);
	var rs=new Array();
	var j=0;
	for(var i=0;i<ls.length;i++){
		if(ls[i].name==value || ls[i].getAttribute(attri)==value) {
			rs[j]=ls[i];
			j++;
		}
	}
	return rs;
};
$C = function(name, type, value){
	var o = document.createElement(name);
	if(o){
		if(type) {
			o.type = type;
			if(value){ o.value = value;}
		}
		else if(value){ o.innerHTML = value;}
		return o;
	}
	throw ("Cannot create object. Message from $C funtion");
};